﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="Modify.aspx.cs" Inherits="lcs.Web.demandplaninfo.Modify" Title="修改页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../../js/jquery-1.6.1.min.js"></script>
    <link href="../../js/jquery.autocomplete.css" rel="stylesheet" />
    <script src="../../js/jquery.autocomplete.js"></script>
    <script type="text/javascript">
        function GetJobTitle(obj) {
            $(obj).autocomplete("../../Handler.ashx", {
                max: 12,    //列表里的条目数
                minChars: 0,    //自动完成激活之前填入的最小字符
                width: 300,     //提示的宽度，溢出隐藏
                scrollHeight: 300,   //提示的高度，溢出显示滚动条
                matchContains: true,    //包含匹配，就是data参数里的数据，是否只要包含文本框里的数据就显示
                autoFill: false,    //自动填充
                extraParams: { key: function () { return encodeURIComponent($(obj).val()); }, key1: function () { return $(obj).val(); } },
                parse: function (data) {
                    return $.map(eval(data), function (row) {
                        return {
                            data: row,
                            value: row.proid,
                            result: row.projectName
                        }
                    }); //对ajax页面传过来的数据进行json转码
                },
                formatItem: function (row, i, max) {
                    return row.projectName;
                },
                formatMatch: function (row, i, max) {
                    return row.projectName + row.proid;
                },
                formatResult: function (row) {
                    return row.projectName;
                }
            }).result(function (event, row, formatted) {
                $("#<%# hfpid.ClientID%>").val(row.proid);
                 return row.projectName;
             });
         }
         $(function () {
             var ac = $("#<%# txtproject.ClientID%>");
             GetJobTitle(ac);

         });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td class="tdbg">

                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                    <tr style="display: none;">
                        <td height="25" width="30%" align="right">需求计划表
	：</td>
                        <td height="25" width="*" align="left">
                            <asp:Label ID="lbldpid" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" width="30%" align="right">项目名称
	：</td>
                        <td height="25" width="*" align="left">
                            <asp:TextBox ID="txtproject" runat="server" Width="350px"></asp:TextBox>不填写为原始值
                            <asp:HiddenField ID="hfpid" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td height="25" width="30%" align="right">计划编号
	：</td>
                        <td height="25" width="*" align="left">
                            <asp:TextBox ID="txtpbh" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" width="30%" align="right">采购类别(物资/服务)
	：</td>
                        <td height="25" width="*" align="left">
                           <asp:DropDownList ID="ddlptype" runat="server">
           
        </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="tdbg" align="center" valign="bottom">
                <asp:Button ID="btnSave" runat="server" Text="保存"
                    OnClick="btnSave_Click" class="inputbutton"></asp:Button>
                <asp:Button ID="btnCancle" runat="server" Text="取消"
                    OnClick="btnCancle_Click" class="inputbutton"></asp:Button>
            </td>
        </tr>
    </table>
</asp:Content>